import axios from 'axios';

axios.interceptors.request.use(function(config){
  if(config.url.indexOf("/admin")>=0){
      let usertoken=localStorage.getItem("usertoken");
      if(usertoken!=null){
          config.headers.Authorization=usertoken;
      }
  }
  return config;
});

export default axios;